﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using NUnit.Framework;
using Frogism.Web.Controllers;
namespace Frogism.Tests.Controllers
{
    [TestFixture]
    public class HomeControllerTests
    {
        [Test]
        public void Index()
        {
            HomeController c = new HomeController();
            var result = c.Index();
            Assert.AreEqual("Index", result.ViewName);
            Assert.IsNotNull(result.ViewData["LatestNews"]);
            Assert.Less(0, ((IEnumerable<Core.NewsItem>)result.ViewData["LatestNews"]).Count(),"LatestNews count");
        }
    }
}
